{extends file="layout/layout.tpl"}

{block name=otherLibraries}
<script type="text/javascript" src="/javascripts/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/javascripts/ckeditor/adapters/jquery.js"></script>
<script type="text/javascript" src="/javascripts/news/index.js"></script>
{/block}

{block name=otherComponents}
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
	<tr>
		<td style="padding: 5px 5px 10px 5px;"><img src="/images/logo.png" alt="Logo" /></td>
		{include file="profile/change_password.tpl"}
	</tr>
	<tr>
		<td colspan="2" style="padding: 10px 5px 0px 5px;">
			{include file="menu/news.tpl"}
			<div id="tab_main">
				<div id="tab_content">
					<!-- New news button will be preprended here -->

					<div class="table_border" id="listNewsTableWrapper" style="display: none;">
						<table id="listNewsTable" cellpadding="0" cellspacing="0" width="100%">
							<thead>
								<tr>
									<th>ID</th>
									<th>Tiêu đề</th>
									<th>Tóm tắt</th>
									<th style="width: 4em;">Tin mới</th>
									<th>Nguồn</th>
									<th style="width: 7em">Chức năng</th>
								</tr>
							</thead>							
							<tbody>
							</tbody>
						</table>
					</div>
					<div id="selectPrivReport" style="display: none;">Bạn không có quyền liệt kê tin tức</div>
				</div>
			</div>
		</td>
  </tr>
  <tr>
  	<td colspan="2" style="padding: 0 5px;" class="footer">&copy; BMSC giữ bản quyền {$smarty.now|date_format: "%Y"}</td>
  </tr>
</table>
<div id="newNewsDialog" title="Thêm tin tức">
	<form id="newNewsForm" method="post">
	<table cellpadding="0" cellspacing="0" width="100%">
		<tr id="newNewsErrorRow" style="display: none;">
      <td>&nbsp;</td>
      <td id="newNewsErrorMessage" class="error"></td>
    </tr>
    <tr>
			<td>Ngôn ngữ <span class="required">*</span></td>
			<td>
				<label><input type="radio" id="newNewsLanguageVietnamese" name="newNewsLanguageID" value="vi" checked="checked"> Tiếng Việt</label>
				<label><input type="radio" id="newNewsLanguageEnglish" name="newNewsLanguageID" value="en"> English</label>
			</td>
		</tr>
		<tr>
			<td>Tiêu đề <span class="required">*</span></td>
			<td><input type="text" id="newNewsTitle" name="newNewsTitle" style="width: 700px;" /></td>
		</tr>
		<tr>
			<td>Ảnh đại diện</td>
			<td>
				<input type="text" id="newNewsImageURL" name="newNewsImageURL" style="width: 400px;" />
				<input type="button" id="newNewsImageSelect" name="newNewsImageSelect" value="Chọn ảnh" />
				<span style="padding: 0 0 0 14px;">Nguồn</span>
				<input type="text" id="newNewsSource" name="newNewsSource" style="width: 150px;" /></td>
			</td>
		</tr>
		<tr>
			<td>Tóm tắt</td>
			<td><input type="text" id="newNewsSummary" name="newNewsSummary" style="width: 700px;" /></td>
		</tr>
		<td>&nbsp;</td>
		<td><input type="checkbox" id="newNewsIsNew" name="newNewsIsNew" value="1"/> Tin mới</td>
		</tr>
		<tr>
			<td>Nội dung</td>
			<td><textarea id="newNewsContent" name="newNewsContent" class="ck_content"></textarea></td>
		</tr>
	</table>
	</form>
</div>
<div id="editNewsDialog" title="Sửa tin tức">
  <form id="editNewsForm" method="post">
  <table cellpadding="0" cellspacing="0" width="100%">
		<tr id="editNewsErrorRow" style="display: none;">
      <td>&nbsp;</td>
      <td id="editNewsErrorMessage" class="error"></td>
    </tr>
    <tr>
			<td>Ngôn ngữ <span class="required">*</span></td>
			<td>
				<label><input type="radio" id="editNewsLanguageVietnamese" name="editNewsLanguageID" value="vi" checked="checked"> Tiếng Việt</label>
				<label><input type="radio" id="editNewsLanguageEnglish" name="editNewsLanguageID" value="en"> English</label>
			</td>
		</tr>
		<tr>
			<td>Tiêu đề <span class="required">*</span></td>
			<td><input type="text" id="editNewsTitle" name="editNewsTitle" style="width: 700px;" /></td>
		</tr>
		<tr>
			<td>Ảnh đại diện</td>
			<td>
				<input type="text" id="editNewsImageURL" name="editNewsImageURL" style="width: 400px;" />
				<input type="button" id="editNewsImageSelect" name="editNewsImageSelect" value="Chọn ảnh" />
				<span style="padding: 0 0 0 14px;">Nguồn</span>
				<input type="text" id="editNewsSource" name="editNewsSource" style="width: 150px;" /></td>
			</td>
		</tr>
		<tr>
			<td>Tóm tắt</td>
			<td><input type="text" id="editNewsSummary" name="editNewsSummary" style="width: 700px;" /></td>
		</tr>
		<tr>
		<td>&nbsp;</td>
		<td><input type="checkbox" id="editNewsIsNew" name="editNewsIsNew" value="1" checked="checked" /> Tin mới</td>
		</tr>
		<tr>
			<td>Nội dung</td>
			<td><textarea id="editNewsContent" name="editNewsContent" class="ck_content"></textarea></td>
		</tr>
		<tr style="display: none;">
			<td colspan="2"><input type="hidden" id="editNewsID" name="editNewsID" /></td>
		</tr>
	</table>
  </form>
</div>
<div id="removeNewsDialog" title="Xóa tin tức">
	<form id="removeNewsForm" method="post">
    <div><img src="/images/icons/delete_32.png" align="left" /> Bạn có chắc chắn xóa tin tức có ID: <span id="removeShowNewsID" style="font-weight: bold;"></span>?</div>
    <input type="hidden" id="removeNewsID" name="removeNewsID" />
  </form>
</div>
{/block}